//
//  TLVideoCell.h
//  FunnyVideo
//
//  Created by 李鑫 on 15/8/19.
//  Copyright © 2015年 NewEggTech. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TLGifAniButton.h"
#import "TLVideoPlayer.h"



@class TLVideoCell;

@protocol VideoEventDelegate <NSObject>
//Video Player Event
- (void)videoPlay:(TLVideoPlayer *)player;
- (void)videoPaused:(TLVideoPlayer *)player;
- (void)videoFastForward:(TLVideoPlayer *)player;
- (void)videoFastReward:(TLVideoPlayer *)player;
- (void)videoValueChanged:(TLVideoPlayer *)player value:(float)value;
//comment event
- (void)videoWillShowComment:(NSString *)v_id cell:(TLVideoCell *)cell;
@end
@interface TLVideoCell : UITableViewCell<UITableViewDelegate,UITableViewDataSource>


//Constaint
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *VideoLayerWc;
@property (strong, nonatomic) IBOutlet UIProgressView *videoProgress;

//Video Cell View
@property (strong, nonatomic) IBOutlet UIView *cellBackgroundView;
@property (strong, nonatomic) IBOutlet UILabel *videoDescriptionLabel;

@property (strong, nonatomic) IBOutlet UILabel *videoFenlei;

@property (strong, nonatomic) IBOutlet UILabel *supportLabel;
@property (strong, nonatomic) IBOutlet UILabel *cmtLabel;

@property (strong, nonatomic) IBOutlet UIView *commentLabel;

@property (strong, nonatomic) IBOutlet UIImageView *separationLine;
@property (strong, nonatomic) IBOutlet UIButton    *cmtButton;


@property (strong, nonatomic) IBOutlet UIImageView *videoColumnImageView;
@property (strong, nonatomic) IBOutlet UIImageView *videoPreviewThumb;
@property (strong, nonatomic) NSURL    *videoUrl;
@property (assign, nonatomic) id <VideoEventDelegate> delegate;
//Comment Thumb Table
@property (strong, nonatomic) IBOutlet UITableView *commentThumbTable;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *VCmtTLayerWc;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *cellCmtThumbTable;

//Comemnt Data Source
@property (strong, nonatomic) NSDictionary *hotComment;

@property (strong, nonatomic) IBOutlet TLGifAniButton *supportButton;



- (TLVideoPlayer *)videoPlayer;
- (void)resetPlayer;
- (void)setVideoAssestURL:(NSURL *)url;
- (void)setVideoID:(NSString *)v_id;
- (void)updateProgress:(float)pg;


- (void)setSupported:(BOOL)spt;

- (CGFloat)caculateMainHeight;

- (void)toggleCommentMode:(BOOL)istoggle;
@end
